@model Senparc.Areas.Admin.Models.VD.Account_IndexVD
@using System.Web.Mvc
@{
    ViewData["Title"] = "用户列表";
}
@section breadcrumbs{
    <li> @ViewData["Title"]</li>
}
<div class="panel panel-green">
    <div class="panel-body">
        @*<div class="pull-left">
                <label for="deleteBtn" class="btn-sm btn btn-danger btn-outline" title="删除">
                    <em class="fa fa-trash-o"></em> &nbsp;<small>删除</small>
                    <input type="submit" id="deleteBtn" onclick="deleteCheck('ids','deleteForm'); return false;" form="deleteForm" class="hidden" value="删除" />
                </label>
            </div>*@
        <form class="form-inline" asp-action="Index" asp-controller="Account">
            <div class="pull-right">
                <div class="input-group">
                    <input type="text" class="form-control input-sm" asp-for="kw" style="width:250px" placeholder="用户名、昵称、真实姓名、手机号" />
                    <span class="input-group-btn">
                        <button class="btn btn-default btn-sm" type="submit">
                            <em class="fa fa-search"></em>
                        </button>
                    </span>
                </div>
            </div>
        </form>
    </div>
    <!-- START table-responsive-->
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover">
            <thead>
                <tr>
                    @*<th data-check-all>
                            <div class="checkbox c-checkbox" data-toggle="tooltip">
                                <label>
                                    <input type="checkbox">
                                    <span class="fa fa-check"></span>
                                </label>
                            </div>
                        </th>*@
                    <th>ID</th>
                    <th>用户名</th>
                    <th>昵称</th>
                    <th>真实姓名</th>
                    <th>手机号</th>
                    <th>邮箱</th>
                    <th>类型</th>
                    <th>Neural Cell 数量</th>
                    <th>开发者认证</th>
                    <th>积分</th>
                    <th>加入时间</th>
                    <th>备注</th>
                    <th>最后一次登录时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model.AccountList)
                {
                    <tr>
                        @*<td>
                                <div class="checkbox c-checkbox">
                                    <label>
                                        <input type="checkbox" name="ids" value="@item.Id" form="deleteForm">
                                        <span class="fa fa-check"></span>
                                    </label>
                                </div>
                            </td>*@

                        <td>@item.Id</td>
                        <td>@item.UserName</td>
                        <td>@item.NickName</td>
                        <td>@item.RealName</td>
                        <td>@item.Phone</td>
                        <td>
                            <a href="mailto: @item.Email">@item.Email</a>
                        </td>
                        <td>@item.Type</td>
                        <td>@item.NeurolApps.Count</td>
                        <td>
                            @(item.Developer == null ? "否" : "已加入开发者")
                            @if (item.Developer != null)
                            {
                                <span>@(item.Developer.Status == Developer_Status.已认证 ? "已认证" : "未认证")</span>
                            }
                        </td>
                        <td>@item.Points</td>
                        <td>@item.AddTime.ToShortDateString()</td>
                        <td>@item.Note</td>
                        <td>@item.ThisLoginTime.ToShortDateString()</td>
                        <td>
                            <a asp-action="Edit" asp-route-id="@item.Id" title="编辑" class="btn-xs btn btn-primary btn-outline">
                                <em class="fa fa-pencil-square-o"></em>
                            </a>
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
    <div class="panel-footer">
        <div class="row">
            @Html.Raw((Html.PagerBar(Model.AccountList, new PagerBarSettings(Url.Action("Index", "Account", new
            {
                pageIndex = "{0}",
               Model.kw
            }))
            {
                NoRecordTip = "无数据",
                barStyle = BarStyle.bootstrap,
                ShowTotalCount = true
            })))
        </div>
    </div>
</div>
<form method="post" asp-action="Delete" id="deleteForm"></form>